home *** CD-ROM | disk | FTP | other *** search
- [[CNT.BAT]]«MDNM»
-
-
- @echo off
- REM CNT.bat to demonstrate
- REM CHANGEJ.bat
- REM =========================
- for %%v in (U T H) DO set %%v=0
- cls
- echo This routine counts from 1 to
- echo 12 and then backwards from 12
- echo to 1. This is achieved using
- echo DOS statements only. It sets
- echo a variable J which may be used
- echo for stack-handling. The range
- echo of J is 000 thru 999, but can
- echo be enlarged easily.
- echo.
- echo Hit any key to go on ...
- pause >nul
- cls
- :INCR
- CALL changej 0 U
- echo %J%
- if not %J%==012 goto INCR
- :DECR
- CALL changej 9 U
- echo %J%
- if not %J%==001 goto DECR
- :Z
- for %%v in (U T H J) DO set %%v=
-